import React, { memo } from 'react'

import { getSizeImg, getCount } from '@/utils'
import { SongsCoverWrap } from './style'


export default memo(function SongsCover(props) {
  const { info } = props

  // console.log(info)

  return (
    <SongsCoverWrap>
      <div className="picUrl sprite_covor">
        <img src={getSizeImg(info.picUrl, 140)} alt={info.copywriter} />
        <div className="count sprite_covor">
          <i className="sprite_icon erji" />
          <span>{getCount(info.playCount)}</span>
          <i className="sprite_icon play" />
        </div>
      </div>
      <div className="info">
        <h4>{info.name}</h4>
      </div>
    </SongsCoverWrap>
  )
})
